{extend	name="homepage"	/}
{block name="right"}
  <!-- content start -->
  <div class="admin-content">
    <div class="admin-content-body">
      <div class="am-cf am-padding am-padding-bottom-0">
        <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">商品类型添加</strong> / <small>Personal information</small></div>
      </div>

      <hr/>

      <div class="am-g">
        <div class="am-u-sm-12 am-u-md-4 am-u-md-push-8">
          

        </div>

        <div class="am-u-sm-12 am-u-md-8 am-u-md-pull-4">
          <form action="{:Url('admin/addpermission/tianjia')}" class="am-form am-form-horizontal" enctype="multipart/form-data"	method="post">

            <label for="user-name" class="am-u-sm-3 am-form-label">所属模块</label>          
            <select name="mid" id='mid' style="width:150px;margin:0px 0px 0px 30px" onchange="first(this)">
               <option value="">请选择</option>
               {volist name="res" id="vo"}
               <option value="{$vo.id}">{$vo.name}</option>
               {/volist}
             </select><br>

             <div class="am-form-group">
                <label for="name" class="am-u-sm-3 am-form-label">名称 </label>
                <div class="am-u-sm-9">
                  <input type="text" name="name" placeholder=" " style="margin:0px 0px 0px -20px">
                </div>
              </div>


              <div class="am-form-group">
                  <label for="name" class="am-u-sm-3 am-form-label">控制器名称 </label>
                  <div class="am-u-sm-9">
                    <input type="text" name="controller" placeholder=" " style="margin:0px 0px 0px -20px">
                  </div>
              </div>

                
              <div class="am-form-group">
                  <label for="name" class="am-u-sm-3 am-form-label">方法名称 </label>
                  <div class="am-u-sm-9">
                    <input type="text" name="method" placeholder=" " style="margin:0px 0px 0px -20px">
                  </div>
              </div>
    
             <!-- <label for="user-name" class="am-u-sm-3 am-form-label">名称 </label>          
            <select name="name" style="width:150px;margin:0px 0px 0px 30px">
               <option value="0">添加</option>
               <option value="1">修改</option>
               <option value="2">删除</option>
             </select><br> -->
            
              
            <div class="am-form-group">
              <div class="am-u-sm-9 am-u-sm-push-3">
                <button type="submit" class="am-btn am-btn-primary" onclick="up">添加</button>
              </div>
            </div>
          </form>
        </div>
      </div>
    </div>

    <footer class="admin-content-footer">
      <hr>
      <p class="am-padding-left">© 2014 AllMobilize, Inc. Licensed under MIT license.</p>
    </footer>

  </div>
  <!-- content end -->
  <script>
    function first(obj){
          // alert ($(obj).val());
          $.ajax({
              url:"{:Url('admin/shopin/shopin')}",
              data:{mid:$(obj).val()},
              dataType:'html',
              type:'post',
              success:function(data){
               
              },
              // error : function(){ }
          })
    }
     function up(){
          $.ajax({
              url:"{:Url('admin/typeshop/tianjia')}",
              data:{name:$('.name').html(),},
              dataType:'html',
              type:'post',
              success:function(data){
              }
                  
          })
      }
      
  </script>
  {/block}

